#include "rclcpp/rclcpp.hpp"
#include "behaviortree_cpp_v3/behavior_tree.h"

ArmAction::ArmAction(const std::string &name,
                     const BT::NodeConfiguration &config)
    : BT::ActionNode(name, config) {}

static BT::PortsList ArmAction::providedPorts() {
  return providedBasicPorts({BT::InputPort<float>("value")});
}

BT::NodeStatus ArmAction::tick() override {

  float value;
  if (getInput("value", value)) {

    std::cout << "value:" << value << std::endl;
  }
  std::cout << "exec arm action............."

      // 机械臂动作逻辑
      // ...

      return BT::NodeStatus::SUCCESS;
}
